<template>
  <!-- 组件根标签 -->
  <div class="hmnavbar">
    <van-nav-bar class="mynav">
      <template #left>
        <i class="iconfont iconbtn_nav_back myicon" @click="back"></i>
      </template>
      <template #title class="cuxi">
        {{ title }}
      </template>
      <template #right>
        <span @click="save" v-if="hassave">保存</span>
      </template>
    </van-nav-bar>
  </div>
</template>
<script>
export default {
  name: 'hmnavbar',
  props: ['title', 'hassave'],
  data () {
    return {}
  },
  methods: {
    back () {
      this.$emit('back')
    },
    save () {
      this.$emit('save')
    }
  },
  components: {}
}
</script>
<style lang="less">
.hmnavbar {
  .mynav {
    .van-nav-bar__left {
      padding: 0;
    }
    .myicon {
      font-size: 40px;
    }
  }
}
</style>
